package com.boco.pciv.service.sale.impl;

import com.boco.pciv.core.service.PcivBaseServiceImpl;
import com.boco.pciv.entity.sale.ManageInfo;
import com.boco.pciv.entity.sale.ManagePayInfo;
import com.boco.pciv.mapper.sale.IManageCheckMapper;
import com.boco.pciv.mapper.sale.IManagePayCheckMapper;
import com.boco.pciv.service.sale.IManageCheckService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


@Service
public class ManageCheckServiceImpl extends PcivBaseServiceImpl<IManageCheckMapper,ManageInfo,Integer> implements IManageCheckService {
    //logger
    private static final Logger _logger = LoggerFactory.getLogger(ManageCheckServiceImpl.class);

    @Autowired
    private IManagePayCheckMapper iManagePayMapper;

    public ManageInfo getManage(String manageNo) {
        Map<String, Object> map = new HashMap();
        map.put("manageNo", manageNo);
        ManageInfo info = mapper.queryOneByMap(map);
        List<ManagePayInfo> list = iManagePayMapper.queryList(map);
        if (list != null && list.size() > 0) {
            info.setPays(list);
        }
        return info;
    }

}
